<template>
  <div class="order-vehicle">
    <h4>{{tips}}</h4>
    <vehicle-list :listData="vehicleListData" />
  </div>
</template>
<script>
import { getCarList } from '../../api'
import VehicleList from '../Msite/Components/VehicleList.vue'
export default {
  components: { VehicleList },
  name: 'orderVehicle',
  data() {
    return {
      tips: '为您精心挑选以下车型，看看有没有喜欢的',
      vehicleListData: []
    }
  },
  mounted() {
    this.getVehicleList();
  },
  methods: {
    getVehicleList() {
      getCarList().then(res => {
        this.vehicleListData = res.data.data;
      })
    }
  }
}
</script>
<style lang="scss" scoped>
.order-vehicle {
  padding: 0 10px;
  box-sizing: border-box;
  h4 {
    font-size: 12px;
    color: #555;
    text-align: center;
  }
  // 车辆
  .vehicle-box {
    width: 100%;
    display: flex;
    justify-content: space-between;
    flex-flow: row wrap;
    .myvan-image {
      width: 48%;
      height: 100%;
      margin-top: 20px;
      text-align: center;
      box-shadow: 0 0 4px rgb(201, 201, 201);
      border-radius: 10px;
      overflow: hidden;
      display: flex;
      flex-flow: row wrap;
      justify-content: flex-start;
      padding: $height/4;
      box-sizing: border-box;
      background-color: #fff;
      // 图片
      .vehicle-img {
        width: 100%;
        height: 100%;
        background-color: #fff;
        text-align: center;
        padding: $height/2;
        box-sizing: border-box;
        img {
          width: 100%;
          height: 100%;
        }
      }
      // 品牌
      .vehicle-brand {
        width: 100%;
        height: $height/2;
        display: flex;
        justify-content: flex-start;
        h5 {
          transform: scale(0.8);
          font-size: 14px;
        }
        span {
          width: 36px;
          height: 20px;
          line-height: 20px;
          border-radius: 4px;
          background-color: $color;
          color: #fff;
          text-align: center;
          transform: scale(0.8);
          font-size: 8px;
        }
      }
      // 配置
      .vehicle-introduce {
        width: 100%;
        height: $height/2;
        line-height: $height/2;
        color: #666;
        // transform: scale(0.8);
        font-size: 8px;
        display: flex;
        justify-content: flex-start;
        align-items: center;
        margin: 4px 0;
        span {
          &:nth-of-type(2):before, &:nth-of-type(3):before {
            content: '·';
            font-size: 20px;
            line-height: $height/2;
            margin: 0 2px;
          }
        }
      }
      // 价格
      .price {
        width: 100%;
        display: flex;
        justify-content: space-between;
        margin: 8px 0;
        span {
          &:nth-of-type(1) {
            color: rgb(243, 22, 22);
            &:before, &:after {
              content: '￥';
              transform: scale(0.1);
              font-size: 8px;
            }
            &:after {
              content: '/天';
              color: #333;
            }
          }
        }
        span {
          &:nth-of-type(2) {
            width: 10px*2;
            height: 10px*2;
            line-height: 10px*2;
            border-radius: 50%;
            transform: scale(0.5);
            font-size: 16px;
            text-align: center;
            background-color: rgb(243, 22, 22);
            color: #fff;
          }
        }
      }
      // 店名
      .shopper {
        span {
          font-size: 10px;
          color: #666;
        }
      }
    }
  }
}
</style>